-
-
Notifications
You must be signed in to change notification settings - Fork 145
Migrate the testsuite to PHPUnit 11 #1977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
78ca057 to
5c2ff5c
Compare
|
The remaining failures for root tests are because our changelog tests currently don't allow changing the composer.json without changelog entries. But here, I'm only changing dev requirements. Another issue affect only the root tests with dev stability is a bug in the |
| "phpunit/phpunit": "^11.5.42", | ||
| "symfony/cache": "^4.4 || ^5.0 || ^6.0 || ^7.0 || ^8.0", | ||
| "symfony/error-handler": "^7.3.2 || ^8.0", | ||
| "symfony/framework-bundle": "^5.4.45 || ^6.4.13 || ^7.1.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This requirement on FrameworkBundle is meant to fix our --prefer-lowest CI job by restrict the lowest bound (for the dependency coming from nyholm/symfony-bundle-test) so that we have a version including the change in symfony/framework-bundle@1c11e27
this change combined with the fact that I install symfony/runtime solves the issue that booting the bundle would attempt at replacing the error handler, causing issues with PHPUnit 11 (this is why I don't let the composer plugin run for the runtime component: I won't care about it).
| failOnNotice="true" | ||
| > | ||
| <coverage> | ||
| <source ignoreSuppressionOfDeprecations="true" ignoreIndirectDeprecations="true"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this package gets indirect deprecations (from illuminate/container) when using the DebugClassLoader. I'm ignoring them here as I still want the DebugClassLoader for our own code.
I'm mixed feelling... the changelog is used by the So components with only change in composer will not be released. This is fine now because the changelog has a pending entry for php 8.2. I'm fine with merging this PR with red test, but I think we should not change the test. |
This would require disabling the branch protection rule though (unless you have permission to bypass it, which I don't). |
I have permission to do it. |
it would make sense, yes. Otherwise the job will fail for all PRs. But I expect it to be merged soon. |
|
@jderusse the Symfony PR is now merged, so we are good to go. |
|
thank you @stof |
This migrates the testsuite to use PHPUnit 11.
I'm now installing phpunit through composer rather than using
simple-phpunitas it is much simpler:matthiasnoback/symfony-config-testalready brings us a transitive dependency anyway (for which we needed to add a conflict rule to prevent issues).I'm still registering
Symfony\Bridge\PhpUnit\SymfonyExtensionfrom the symfony phpunit bridge in our config. The feature I wanted is the registration of the DebugClassLoader ofsymfony/error-handlerto report deprecations detecting by the DebugClassLoader (which was previously done for root tests where error-handler is installed by FrameworkBundle but not for component tests where it was not installed). It might also be useful if we want to use the ClockMock or DnsMock features in the future.